package dw.customer

/**
 * Represents a customer.
 */
class Customer {

	CustomerActiveData		activeData
	
	AddressBook				addressBook
	
	boolean					anonymous,
							authenticated,
							externallyAuthenticated,
							registered
							
	Collection				customerGroups
	
	String					ID,
							note,
							UUID
							
	OrderHistory			orderHistory
	
	Profile					profile
								
	
    static constraints = {
		activeData(nullable: true)
		addressBook(nullable: true)
		anonymous(nullable: true)
		authenticated(nullable: true)
		externallyAuthenticated(nullable: true)
		registered(nullable: true)
		customerGroups(nullable: true)
		ID(nullable: false, blank: false)
		note(nullable: true)
		orderHistory(nullable: true)
		profile(nullable: true)
    }
	
	static mapping = {
		id generator: "uuid", name: "UUID", column: "UUID", unique:"true"
	}
}
